package com.panshi;

import com.panshi.api.impl.UserFusing;


import com.panshi.api.vo.UserLoginVo;
import com.panshi.api.util.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author :jiege
 * @description :
 * @create :2020-08-04 16:30:00
 */
@FeignClient(value = "hasbei-user",fallback = UserFusing.class)
@Api(tags = "普通用户接口")
public interface UserLoginPort {

    @PostMapping("/user/login")
    @ApiOperation("用户登录接口")
    public CommonResult userlogin(@Validated @ApiParam("用户登录接口属性类") @RequestBody UserLoginVo beiUser);

    @PostMapping("/user/getep")
    @ApiOperation("发送邮箱 短信验证码")
    public Map<String, Object> getemail(@ApiParam("手机号/邮箱") String iphone_email) throws Exception;

    @PutMapping("/user/register")
    @ApiOperation("用户注册")
    public CommonResult register(@Validated @ApiParam("用户注册属性类") UserLoginVo userLoginVo);

    @PostMapping("/user/forgetpwd")
    @ApiOperation("用户忘记密码接口")
    public CommonResult forgetpwd(@RequestBody UserLoginVo userLoginVo);

}
